package com.example.demo;

import org.junit.jupiter.api.Test;

class WeatherServiceTests {

	@Test
	void testsForecast() {
		WeatherService weatherService = new WeatherService();
		String forecast = weatherService.getWeatherForecastByLocation(37.8267, -122.4233);
		System.out.println(forecast); // Output: The weather forecast for (37.8267, -122.4233) is ... (actual forecast
	}

	@Test
	void testShanghaiWeatherForecast() {
		WeatherService weatherService = new WeatherService();
		String forecast = weatherService.getWeatherForecastByLocation(31.2304, -121.4737);
		System.out.println("纽约天气预报: " + forecast);
	}

	@Test
	void testAlerts() {
		WeatherService weatherService = new WeatherService();
		String alerts = weatherService.getAlerts("CA");
		System.out.println(alerts); // Output: The weather alerts for CA are ... (actual alerts)
	}

}
